// 引入当前页面的less
require("../less/advertisement.less");



// 原生实现 JQuery 的 $(function() {}) = = document.ready = function (){}
// 点击跳过,跳转到登录页
window.addEventListener('load',function(){
      // 获取元素
    let go = document.querySelector('.go')
    let countdown = document.querySelector('#countdown')

    // 倒计时跳转
    let num = 5
    countdown.textContent = num
    let timeID = setInterval(function(){
        num--
        countdown.textContent = num
        // 判断
        if(num === 0){
            clearInterval(timeID)
            window.location.href = 'login.html'
        } 
        countdown.textContent = num
    },1000)

    // 跳过
    go.addEventListener('click',function(){
        clearInterval(timeID)
        // 跳转到账户登录
        window.location.href = 'login.html'
    })
})
   
  
    
    
